Skip to content

Feat/agentic#17

Merged
AperturePlus merged 38 commits into
mainfrom
feat/agentic
May 24, 2026
Merged

Feat/agentic#17
AperturePlus merged 38 commits into
mainfrom
feat/agentic

Conversation

@AperturePlus
Copy link
Copy Markdown
Owner

bug fixes and console implementation

AperturePlus and others added 30 commits May 24, 2026 10:29
将 Dashboard.vue 重构为多页式 Console,并补齐 7 个后端 admin 路由
(users/storage/files/moderation/logs/notifications/system)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… plans

Plan A:7 个 /admin/* 路由全量实现,含 schemas/services/routers/测试,
基于现有 RegistrationEmailDomainRule 模式 + agents.md 五件套约束。

Plan B:pages/dashboard/ -> pages/console/ 多页化,9 子页 + 7 共享组件,
路由 + i18n + 主框架导航整合,删除旧 Dashboard.vue。

两份 plan 相互独立:B 可先靠 mock 自洽完成,A 落地后切换 setupMocks() 即可对真实后端。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add getAdminStorageSummary, getAdminLogs, getAdminNotifications,
  archiveAdminNotification; rewire broadcastNotification to
  /admin/notifications/broadcast.
- Add GetAdminLogsRequest; normalize LogsList to {logs, pagination}
  to match standard PaginatedData shape; surface optional userId on
  LogItem.
- Add /admin/storage/summary, /admin/logs, /admin/notifications,
  /admin/notifications/broadcast, /admin/notifications/{id} mocks
  so Plan B can land independently of Plan A.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds ConsoleLayout (sidebar + router-view nested inside MainLayout's
content area) and 9 placeholder subpages. Old /dashboard route is now
a redirect to /console/overview so existing bookmarks keep working.

i18n: add console.title + console.nav.* (zh/en). The header.menu
rename to 'console' is intentionally deferred to Task 12 so the
sidebar dispatcher and the old menu entry can coexist mid-refactor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds KpiCard, StatusBadge, FilterBar, AdminTable, TrendChart,
BroadcastComposer, QuotaEditor + barrel export. All components are
view-only (no data fetching) and consume the Industrial Dashboard
token system (--ac/--ac-fg, --status-*, --surface-raised, --font-mono,
tabular-nums).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 KPI cards (storage used/limit/files/users/violations/active uploads),
7-day storage trend, and the 5 most recent admin log lines. Fans out
to /admin/storage/summary, /storage/usage-trend, /admin/violations,
/admin/logs, /admin/system/health concurrently on mount.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filtered admin user list with suspend/activate toggle. Extend
getAdminUsers signature to accept search/status/role filters, and
teach the /admin/users mock to honor them (plus emit lastLoginAt so
the row footer renders).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 KPI cards (used/limit/users), a 7/14/30-day trend switcher, and a
per-user quota table. Inline QuotaEditor replaces the Adjust button
when activated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Filtered table of admin files (search + virusStatus) with inline
rescan action. Hash and mime are surfaced inline so flagged uploads
can be triaged without leaving the table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Violation queue with status filter (pending/under_review/resolved),
level + status badges, and a one-click Resolve action. Resolve is
disabled once a case is closed so it can't be re-triggered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Health grid surfaces feature flags (virus scan, thumbnails, mail,
hashing), active vs. max uploads, and configured platform targets;
rate-limit table lists each scoped rule with current/limit/blocked
counters in tabular-nums.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three-column grid (timestamp · operation · ip/user) with userId and
operation filters wired to /admin/logs. Pagination honors the
{logs, pagination} response shape introduced in Task 0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
BroadcastComposer (title + message) submits to
/admin/notifications/broadcast; table below lists past notifications
with archive action that re-reads the current page so deleted rows
disappear immediately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lifts the registration email domain rule manager out of the old
Dashboard into its own subpage. Inline create row, enabled/disabled
filter, and toggle/delete actions per row; reuses the existing
/admin/registration-email-domain-rules API surface unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
UserMenu and the layout Header now point at /console/overview using
the new header.menu.console i18n key (zh: 控制台, en: Console). The
old pages/dashboard/ surface is deleted along with the dead getLogs
api/type/mock — only getAdminLogs at /admin/logs survives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add cancel_upload_session service method with cleanup
- Extract _collect_task_cleanup_keys for reuse
- Expose POST /uploads/{upload_id}/cancel route
- Add UploadCancelResponse schema
- Add CancelUploadResponse type
- Add cancelUploadSession API function
- Add mock handler for POST /uploads/{id}/cancel
- Track completedUploadIds for conflict detection
- Add signal/abort support to calculateFileHash
- Add UploadCanceledError, isUploadCanceledError, throwIfAborted utilities
- Thread AbortSignal through uploadFile, uploadChunks, executeConcurrentTasks
- Add reconcileMergeResult signal support
- Extract helper functions: delay, normalizeCanceledError, isTimeoutOrNetworkError
- Clean up JSDoc comments and formatting
- Add useUploadStore with task lifecycle management
- Support hashing/uploading/succeeded/failed/canceled states
- AbortController integration for upload cancellation
- Backend cancelUploadSession call on task cancel
- Terminal-task auto-cleanup with configurable delay
- activeUploadingCount computed for sidebar indicator
- Refactor useUpload to delegate to Pinia upload store
- Add cancel button and status labels to UploadProgressTray
- Add upload-pulse indicator in LeftSidebar for active uploads
- Wire cancelUpload in MyFiles page
- Add i18n keys for cancel/state labels (zh + en)
- Update specs for store delegation and cancel emit
- Add test for cancel aborts task and cleans up objects
- Add test for idempotent cancel of already-aborted task
- Add test for 409 rejection of completed task
- Add route integration test for POST /uploads/{id}/cancel
Add GET /uploads/recoverable endpoint that returns active, non-expired
upload sessions for the current user. Includes RecoverableUploadSession
schema, service method, route, and backend tests.
Add UploadRecoverableSession type, getRecoverableUploads API call,
and mock handler for GET /uploads/recoverable with updatedAt tracking.
Extract completeUploadSession helper for merging fully-uploaded sessions.
Add onFileHashed callback to uploadFile options for real-time hash tracking.
Add Chinese and English translations for resume action, paused status,
session expired hint, and need-reselect hint.
…tore

Major store refactor:
- Persist active tasks to localStorage with beforeunload guard
- bootstrapRecovery: load persisted tasks and reconcile with backend
- syncRecoverableTasks: match persisted tasks with server sessions
- resumeTask: continue paused upload with new File
- tryAutoMergeTask: auto-complete fully-uploaded sessions on recovery
- Add fileHash, mimeType fields to UploadTask
- Extract attachUploadedFile helper
- Resume mode in runUploadTask (no toast on failure)
- Comprehensive store tests for recovery, resume, and auto-merge
- Add paused status support with resume button
- Show error hint text below file name
- Wrap actions in .tray__actions container for layout
- Add .tray__resume styles matching .tray__cancel
- Update tests for paused task row and resume event
- Add resumeUpload method to useUpload composable
- Call bootstrapRecovery on composable init
- Add hidden resume file input in MyFiles page
- Wire handleResumeTask and handleResumeFileSelect handlers
- Connect UploadProgressTray @resume event to resume flow
@AperturePlus AperturePlus merged commit 90bd356 into main May 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant